package com.v1.video.db.dao;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import com.v1.video.dbcore.greenrobot.dao.AbstractDao;
import com.v1.video.dbcore.greenrobot.dao.AbstractDaoSession;
import com.v1.video.dbcore.greenrobot.dao.identityscope.IdentityScopeType;
import com.v1.video.dbcore.greenrobot.dao.internal.DaoConfig;

import com.v1.video.db.dao.CacheTB;
import com.v1.video.db.dao.VideoTB;
import com.v1.video.db.dao.RecommendTB;
import com.v1.video.db.dao.StatisticsTB;
import com.v1.video.db.dao.OperateTB;
import com.v1.video.db.dao.NewRecordTB;
import com.v1.video.db.dao.ThemeTB;
import com.v1.video.db.dao.MyThemeTB;
import com.v1.video.db.dao.ThemeVideoTB;
import com.v1.video.db.dao.MyThemeVideoTB;

import com.v1.video.db.dao.CacheTBDao;
import com.v1.video.db.dao.VideoTBDao;
import com.v1.video.db.dao.RecommendTBDao;
import com.v1.video.db.dao.StatisticsTBDao;
import com.v1.video.db.dao.OperateTBDao;
import com.v1.video.db.dao.NewRecordTBDao;
import com.v1.video.db.dao.ThemeTBDao;
import com.v1.video.db.dao.MyThemeTBDao;
import com.v1.video.db.dao.ThemeVideoTBDao;
import com.v1.video.db.dao.MyThemeVideoTBDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig cacheTBDaoConfig;
    private final DaoConfig videoTBDaoConfig;
    private final DaoConfig recommendTBDaoConfig;
    private final DaoConfig statisticsTBDaoConfig;
    private final DaoConfig operateTBDaoConfig;
    private final DaoConfig newRecordTBDaoConfig;
    private final DaoConfig themeTBDaoConfig;
    private final DaoConfig myThemeTBDaoConfig;
    private final DaoConfig themeVideoTBDaoConfig;
    private final DaoConfig myThemeVideoTBDaoConfig;

    private final CacheTBDao cacheTBDao;
    private final VideoTBDao videoTBDao;
    private final RecommendTBDao recommendTBDao;
    private final StatisticsTBDao statisticsTBDao;
    private final OperateTBDao operateTBDao;
    private final NewRecordTBDao newRecordTBDao;
    private final ThemeTBDao themeTBDao;
    private final MyThemeTBDao myThemeTBDao;
    private final ThemeVideoTBDao themeVideoTBDao;
    private final MyThemeVideoTBDao myThemeVideoTBDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        cacheTBDaoConfig = daoConfigMap.get(CacheTBDao.class).clone();
        cacheTBDaoConfig.initIdentityScope(type);

        videoTBDaoConfig = daoConfigMap.get(VideoTBDao.class).clone();
        videoTBDaoConfig.initIdentityScope(type);

        recommendTBDaoConfig = daoConfigMap.get(RecommendTBDao.class).clone();
        recommendTBDaoConfig.initIdentityScope(type);

        statisticsTBDaoConfig = daoConfigMap.get(StatisticsTBDao.class).clone();
        statisticsTBDaoConfig.initIdentityScope(type);

        operateTBDaoConfig = daoConfigMap.get(OperateTBDao.class).clone();
        operateTBDaoConfig.initIdentityScope(type);

        newRecordTBDaoConfig = daoConfigMap.get(NewRecordTBDao.class).clone();
        newRecordTBDaoConfig.initIdentityScope(type);

        themeTBDaoConfig = daoConfigMap.get(ThemeTBDao.class).clone();
        themeTBDaoConfig.initIdentityScope(type);

        myThemeTBDaoConfig = daoConfigMap.get(MyThemeTBDao.class).clone();
        myThemeTBDaoConfig.initIdentityScope(type);

        themeVideoTBDaoConfig = daoConfigMap.get(ThemeVideoTBDao.class).clone();
        themeVideoTBDaoConfig.initIdentityScope(type);

        myThemeVideoTBDaoConfig = daoConfigMap.get(MyThemeVideoTBDao.class).clone();
        myThemeVideoTBDaoConfig.initIdentityScope(type);

        cacheTBDao = new CacheTBDao(cacheTBDaoConfig, this);
        videoTBDao = new VideoTBDao(videoTBDaoConfig, this);
        recommendTBDao = new RecommendTBDao(recommendTBDaoConfig, this);
        statisticsTBDao = new StatisticsTBDao(statisticsTBDaoConfig, this);
        operateTBDao = new OperateTBDao(operateTBDaoConfig, this);
        newRecordTBDao = new NewRecordTBDao(newRecordTBDaoConfig, this);
        themeTBDao = new ThemeTBDao(themeTBDaoConfig, this);
        myThemeTBDao = new MyThemeTBDao(myThemeTBDaoConfig, this);
        themeVideoTBDao = new ThemeVideoTBDao(themeVideoTBDaoConfig, this);
        myThemeVideoTBDao = new MyThemeVideoTBDao(myThemeVideoTBDaoConfig, this);

        registerDao(CacheTB.class, cacheTBDao);
        registerDao(VideoTB.class, videoTBDao);
        registerDao(RecommendTB.class, recommendTBDao);
        registerDao(StatisticsTB.class, statisticsTBDao);
        registerDao(OperateTB.class, operateTBDao);
        registerDao(NewRecordTB.class, newRecordTBDao);
        registerDao(ThemeTB.class, themeTBDao);
        registerDao(MyThemeTB.class, myThemeTBDao);
        registerDao(ThemeVideoTB.class, themeVideoTBDao);
        registerDao(MyThemeVideoTB.class, myThemeVideoTBDao);
    }
    
    public void clear() {
        cacheTBDaoConfig.getIdentityScope().clear();
        videoTBDaoConfig.getIdentityScope().clear();
        recommendTBDaoConfig.getIdentityScope().clear();
        statisticsTBDaoConfig.getIdentityScope().clear();
        operateTBDaoConfig.getIdentityScope().clear();
        newRecordTBDaoConfig.getIdentityScope().clear();
        themeTBDaoConfig.getIdentityScope().clear();
        myThemeTBDaoConfig.getIdentityScope().clear();
        themeVideoTBDaoConfig.getIdentityScope().clear();
        myThemeVideoTBDaoConfig.getIdentityScope().clear();
    }

    public CacheTBDao getCacheTBDao() {
        return cacheTBDao;
    }

    public VideoTBDao getVideoTBDao() {
        return videoTBDao;
    }

    public RecommendTBDao getRecommendTBDao() {
        return recommendTBDao;
    }

    public StatisticsTBDao getStatisticsTBDao() {
        return statisticsTBDao;
    }

    public OperateTBDao getOperateTBDao() {
        return operateTBDao;
    }

    public NewRecordTBDao getNewRecordTBDao() {
        return newRecordTBDao;
    }

    public ThemeTBDao getThemeTBDao() {
        return themeTBDao;
    }

    public MyThemeTBDao getMyThemeTBDao() {
        return myThemeTBDao;
    }

    public ThemeVideoTBDao getThemeVideoTBDao() {
        return themeVideoTBDao;
    }

    public MyThemeVideoTBDao getMyThemeVideoTBDao() {
        return myThemeVideoTBDao;
    }

}
